<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<%@ page import="java.util.Date"%>
<%@ page import="com.google.gdata.data.photos.*"%>
<%@ page import="com.diemat.tools.PicasaAccess"%>
<%
	PicasaAccess myPicasa = new PicasaAccess();
	String albumId = request.getParameter("albumId");
	AlbumFeed feed = myPicasa.getAlbumFeed("puteaux.handball", albumId);
	String albumName = feed.getTitle().getPlainText();
%>
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<title><%=albumName %></title>
<link href="assets/css/jbgallery-2.0.css" id="jbgallery-css"
	rel="stylesheet" media="javascript-screen" />
<script src="assets/js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="assets/js/jbgallery-2.0.js" type="text/javascript"></script>
<script type="text/javascript"><!--
   	jQuery(document).ready(function(){
		jQuery(".jbgallery").jbgallery({
			style     : "centered",
			slideshow : true, 
			autohide  : true,
			clickable : true,
			timers : { 
				autohide : 2000
			}
		});
	});
	--></script>
</head>
<body>
	<div class="jbgallery">
		<ul>
			<%
			System.out.println("Nombre de photo dans l'album: "+feed.getPhotoEntries().size());
			for (PhotoEntry photo : feed.getPhotoEntries()) {
			%>
			<li><a title="<%=photo.getTitle().getPlainText()%>"
				href="<%=photo.getMediaContents().get(0).getUrl()%>"><img
					src="<%=photo.getMediaContents().get(0).getUrl()%>" alt="" /></a>
				<div class="caption">
				<a href="<%=photo.getHtmlLink().getHref()%>"><img
					src="<%=photo.getMediaThumbnails().get(0).getUrl()%>" alt="" /></a>
					
				</div></li>
			<%
				}
			%>
		</ul>
	</div>
</body>
</html>